package com.david.jetpack.lifecycle

import android.util.Log
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner

class MyObserver: DefaultLifecycleObserver {
    override fun onCreate(owner: LifecycleOwner) {
        super.onCreate(owner)
        Log.e("lifecycle", "onCreate...")
    }
    override fun onResume(owner: LifecycleOwner) {
        super.onResume(owner)
        Log.e("lifecycle", "onResume...")
    }

    override fun onPause(owner: LifecycleOwner) {
        super.onPause(owner)
        Log.e("lifecycle", "onPause...")
    }
}